package com.taptech.doufu.ui.view.theme.editnovel;

import android.util.SparseArray;

import com.taptech.doufu.R;
import com.taptech.doufu.app.WeMediaApplication;
import com.taptech.doufu.constant.SharedPreferencesKey;
import com.taptech.doufu.util.sp.DiaoBaoSharedPreferences;
import com.taptech.doufu.ui.view.theme.ThemeType;

/**
 * Created by Wyatt on 2017/11/25/025.
 */

public class EditNovelThemeHelper {
    private static EditNovelTheme editNovelTheme;

    public static EditNovelTheme getEditNovelTheme() {
        if (editNovelTheme == null) {
            boolean isNight = WeMediaApplication.getInstance().isDayNightMode_Night;
            if(isNight){
                editNovelTheme = getTheme(ThemeType.TYPE_NIGHT);
            }else{
                int themeType = DiaoBaoSharedPreferences.getSharedPreferencesValueToInt(SharedPreferencesKey.SP_EDIT_NOVEL_PAGE_THEME_STYTE,
                        WeMediaApplication.applicationContext, ThemeType.TYPE_DAY);
                editNovelTheme = getTheme(themeType);
            }
        }
        return editNovelTheme;
    }

    public static void clearTheme() {
        if (editNovelTheme != null) {
            editNovelTheme = null;
        }
    }

    public static EditNovelTheme updataEditNovelTheme(int type) {
        editNovelTheme = getTheme(type);
        DiaoBaoSharedPreferences.setSharedPreferencesValueToInt(SharedPreferencesKey.SP_EDIT_NOVEL_PAGE_THEME_STYTE,
                type,WeMediaApplication.applicationContext);
        return editNovelTheme;
    }



    /**
     * 判断背景是否为图片
     * @param editNovelTheme
     * @return
     */
    public static boolean bgIsPicture(EditNovelTheme editNovelTheme) {
        if (editNovelTheme.getThemeType() == ThemeType.TYPE_BOOK_BUFF ||
                editNovelTheme.getThemeType() == ThemeType.TYPE_BOOK_WHITE ||
                editNovelTheme.getThemeType() == ThemeType.TYPE_BOOK_RED) {
            return true;
        }else {
            return false;
        }
    }

    private static EditNovelTheme getTheme(int type) {
        EditNovelTheme editNovelTheme;
        switch (type) {
            case ThemeType.TYPE_DAY:
                editNovelTheme = getThemeDay(type);
                break;
            case ThemeType.TYPE_NIGHT:
                editNovelTheme = getThemeNight(type);
                break;
            case ThemeType.TYPE_AQUA:
                editNovelTheme = getThemeAquq(type);
                break;
            case ThemeType.TYPE_BLUE:
                editNovelTheme = getThemeBlue(type);
                break;
            case ThemeType.TYPE_RED:
                editNovelTheme = getThemeRed(type);
                break;
            case ThemeType.TYPE_BUFF:
                editNovelTheme = getThemeBuff(type);
                break;
            case ThemeType.TYPE_BOOK_WHITE:
                editNovelTheme = getThemeBookWhite(type);
                break;
            case ThemeType.TYPE_BOOK_BUFF:
                editNovelTheme = getThemeBookBuff(type);
                break;
            case ThemeType.TYPE_BOOK_RED:
                editNovelTheme = getThemeBookRed(type);
                break;
            default:
                editNovelTheme = getThemeDay(ThemeType.TYPE_DAY);
        }
        return editNovelTheme;
    }

    public static EditNovelTheme getThemeDay(int type) {
        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_content_bg_color_day,
                R.drawable.novel_back_img,
                R.drawable.novel_retreat2_img,
                R.drawable.novel_retreat_img,
                R.drawable.novel_advance2_img,
                R.drawable.novel_advance_img,
                R.drawable.novel_timi_img,
                R.drawable.novel_save_img,
                R.color.read_desc_font_color_day,
                R.color.novel_edit_sent_btn_text_color_day,
                R.drawable.novel_create_line,
                R.drawable.one_pattern,
                R.drawable.novel_sensitive_img);
        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.novel_night_img,
                R.drawable.novel_setup_img,
                R.drawable.novel_history_img,
                R.color.read_desc_font_color_day,
                R.color.read_content_bg_color_day,
                1.0f,
                R.drawable.img_dialog_white2);

        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_day,
                R.drawable.read_brightness_reduce,
                R.drawable.read_brightness_increase,
                R.drawable.read_font_size_add,
                R.drawable.read_font_size_sub,
                themeSelectArray,
                R.drawable.read_selected,
                1.0f,
                R.color.read_sys_light_select_font_color_day,
                R.color.read_sys_light_unselect_font_color_day,
                R.drawable.read_sys_light_bg_day);
        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_day,
                R.color.novel_edit_content_color_day,
                R.color.novel_edit_line_color_day,
                R.color.novel_edit_content_hint_color_day,
                R.drawable.seekbar_style_read,
                R.drawable.read_process,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }

    public static EditNovelTheme getThemeNight(int type) {
        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_menu_bg_color_night,
                R.drawable.novel_back_img,
                R.drawable.novel_retreat2_night_img,
                R.drawable.novel_retreat_night_img,
                R.drawable.novel_advance2_night_img,
                R.drawable.novel_advance_night_img,
                R.drawable.novel_timi_night_img,
                R.drawable.novel_save_night_img,
                R.color.read_desc_font_color_night,
                R.color.read_sys_light_select_font_color_night,
                R.drawable.novel_create_line_night,
                R.drawable.one_pattern_night_img,
                R.drawable.novel_sensitive_night_img);


        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_day_st,
                R.drawable.novel_setup_night_img,
                R.drawable.novel_history_night_img,
                R.color.read_desc_font_color_night,
                R.color.read_menu_bg_color_night,
                0.5f,
                R.drawable.img_dialog_night);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_night,
                R.drawable.read_brightness_increase_night,
                R.drawable.read_brightness_reduce_increase,
                R.drawable.read_font_size_add_night,
                R.drawable.read_font_size_sub_night,
                themeSelectArray,
                R.drawable.read_selected,
                0.5f,
                R.color.read_sys_light_select_font_color_night,
                R.color.read_sys_light_unselect_font_color_night,
                R.drawable.read_sys_light_bg_night);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.bg_dark,
                R.color.sep_dark,
                R.drawable.creating_novels_retractkeyboard_night
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_night,
                R.color.read_content_font_color_night,
                R.color.read_line_color_night,
                R.color.read_content_font_color_night,
                R.drawable.seekbar_style_read_night,
                R.drawable.read_process,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }

    /**
     * 浅绿色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeAquq(int type) {


        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_content_bg_color_aqua,
                R.drawable.novel_back_img_aqua,
                R.drawable.novel_retreat2_img_aqua,
                R.drawable.novel_retreat_img_aqua,
                R.drawable.novel_advance2_img_aqua,
                R.drawable.novel_advance_img_aqua,
                R.drawable.novel_timi_img_aqua,
                R.drawable.novel_save_img_aqua,
                R.color.read_auto_play_nomal_font_color_aqua,
                R.color.read_sys_light_select_font_color_aqua,
                R.drawable.novel_create_line_aqua,
                R.drawable.one_pattern_img_aqua,
                R.drawable.novel_sensitive_img_aqua);

        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_aqua,
                R.drawable.novel_setup_img_aqua,
                R.drawable.novel_history_img_aqua,
                R.color.read_auto_play_nomal_font_color_aqua,
                R.color.read_content_bg_color_aqua,
                1.0f,
                R.drawable.img_dialog_aqua);

        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);

        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_aqua,
                R.drawable.read_brightness_reduce_aqua,
                R.drawable.read_brightness_increase_aqua,
                R.drawable.read_font_size_add_aqua,
                R.drawable.read_font_size_sub_aqua,
                themeSelectArray,
                R.drawable.read_selected_aqua,
                1.0f,
                R.color.read_sys_light_select_font_color_aqua,
                R.color.read_sys_light_unselect_font_color_aqua,
                R.drawable.read_sys_light_bg_aqua);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_aqua,
                R.color.novel_edit_content_color_aque,
                R.color.novel_edit_line_color_aque,
                R.color.novel_edit_content_hint_color_aque,
                R.drawable.seekbar_style_read_aqua,
                R.drawable.read_process_aqua,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);
    }



    /**
     * 浅黄色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeBuff(int type) {

        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_content_bg_color_buff,
                R.drawable.novel_back_img_buff,
                R.drawable.novel_retreat2_img_buff,
                R.drawable.novel_retreat_img_buff,
                R.drawable.novel_advance2_img_buff,
                R.drawable.novel_advance_img_buff,
                R.drawable.novel_timi_img_buff,
                R.drawable.novel_save_img_buff,
                R.color.read_desc_font_color_buff,
                R.color.read_sys_light_select_font_color_buff,
                R.drawable.novel_create_line_buff,
                R.drawable.one_pattern_img_buff,
                R.drawable.novel_sensitive_img_buff);


        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_buff,
                R.drawable.novel_setup_img_buff,
                R.drawable.novel_history_img_buff,
                R.color.read_desc_font_color_buff,
                R.color.read_content_bg_color_buff,
                1.0f,
                R.drawable.img_dialog_buff);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_buff,
                R.drawable.read_brightness_reduce_buff,
                R.drawable.read_brightness_increase_buff,
                R.drawable.read_font_size_add_buff,
                R.drawable.read_font_size_sub_buff,
                themeSelectArray,
                R.drawable.read_selected_buff,
                1.0f,
                R.color.read_sys_light_select_font_color_buff,
                R.color.read_sys_light_unselect_font_color_buff,
                R.drawable.read_sys_light_bg_buff);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_buff,
                R.color.novel_edit_content_color_buff,
                R.color.novel_edit_line_color_buff,
                R.color.novel_edit_content_hint_color_buff,
                R.drawable.seekbar_style_read_buff,
                R.drawable.read_process_buff,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }



    /**
     * 仿真浅黄色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeBookBuff(int type) {

        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.drawable.read_theme_bg_3_bar,
                R.drawable.novel_back_img_buff,
                R.drawable.novel_retreat2_img_buff,
                R.drawable.novel_retreat_img_buff,
                R.drawable.novel_advance2_img_buff,
                R.drawable.novel_advance_img_buff,
                R.drawable.novel_timi_img_buff,
                R.drawable.novel_save_img_buff,
                R.color.read_desc_font_color_buff,
                R.color.read_sys_light_select_font_color_buff,
                R.drawable.novel_create_line_buff,
                R.drawable.one_pattern_img_buff,
                R.drawable.novel_sensitive_img_buff);


        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_buff,
                R.drawable.novel_setup_img_buff,
                R.drawable.novel_history_img_buff,
                R.color.read_desc_font_color_buff,
                R.drawable.read_theme_bg_3_bar,
                1.0f,
                R.drawable.img_dialog_buff);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_buff,
                R.drawable.read_brightness_reduce_buff,
                R.drawable.read_brightness_increase_buff,
                R.drawable.read_font_size_add_buff,
                R.drawable.read_font_size_sub_buff,
                themeSelectArray,
                R.drawable.read_selected_buff,
                1.0f,
                R.color.read_sys_light_select_font_color_buff,
                R.color.read_sys_light_unselect_font_color_buff,
                R.drawable.read_sys_light_bg_buff);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type, R.drawable.read_theme_bg_3,
                R.color.novel_edit_content_color_book_buff,
                R.color.novel_edit_line_color_book_buff,
                R.color.novel_edit_content_hint_color_book_buff,
                R.drawable.seekbar_style_read_buff,
                R.drawable.read_process_buff,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }

    /**
     * 浅蓝色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeBlue(int type) {

        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_content_bg_color_blue,
                R.drawable.novel_back_img_blue,
                R.drawable.novel_retreat2_img_blue,
                R.drawable.novel_retreat_img_blue,
                R.drawable.novel_advance2_img_blue,
                R.drawable.novel_advance_img_blue,
                R.drawable.novel_timi_img_blue,
                R.drawable.novel_save_img_blue,
                R.color.read_desc_font_color_blue,
                R.color.read_sys_light_select_font_color_blue,
                R.drawable.novel_create_line_blue,
                R.drawable.one_pattern_img_blue,
                R.drawable.novel_sensitive_img_blue);


        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_blue,
                R.drawable.novel_setup_img_blue,
                R.drawable.novel_history_img_blue,
                R.color.read_desc_font_color_blue,
                R.color.read_content_bg_color_blue,
                1.0f,
                R.drawable.img_dialog_blue);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_blue,
                R.drawable.read_brightness_reduce_blue,
                R.drawable.read_brightness_increase_blue,
                R.drawable.read_font_size_add_blue,
                R.drawable.read_font_size_sub_blue,
                themeSelectArray,
                R.drawable.read_selected_blue,
                1.0f,
                R.color.read_sys_light_select_font_color_blue,
                R.color.read_sys_light_unselect_font_color_blue,
                R.drawable.read_sys_light_bg_blue);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_blue,
                R.color.novel_edit_content_color_blue,
                R.color.novel_edit_line_color_blue,
                R.color.novel_edit_content_hint_color_blue,
                R.drawable.seekbar_style_read_blue,
                R.drawable.read_process_blue,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);
    }
    /**
     * 仿真白纸质主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeBookWhite(int type) {
        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.drawable.read_theme_bg_1_bar,
                R.drawable.novel_back_img_simulationwhite,
                R.drawable.novel_retreat2_img_simulationwhite,
                R.drawable.novel_retreat_img_simulationwhite,
                R.drawable.novel_advance2_img_simulationwhite,
                R.drawable.novel_advance_img_simulationwhite,
                R.drawable.novel_timi_img_simulationwhite,
                R.drawable.novel_save_img_simulationwhite,
                R.color.read_desc_font_color_day,
                R.color.read_desc_font_color_day,
                R.drawable.novel_create_line_simulationwhite,
                R.drawable.one_pattern_simulationwhite,
                R.drawable.novel_sensitive_img_simulationwhite);
        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.novel_night_img_simulationwhite,
                R.drawable.novel_setup_img_simulationwhite,
                R.drawable.novel_history_img_simulationwhite,
                R.color.read_desc_font_color_day,
                R.drawable.read_theme_bg_1_bar,
                1.0f,
                R.drawable.img_dialog_simulationwhite);

        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_day,
                R.drawable.read_brightness_reduce,
                R.drawable.read_brightness_increase,
                R.drawable.read_font_size_add,
                R.drawable.read_font_size_sub,
                themeSelectArray,
                R.drawable.read_selected,
                1.0f,
                R.color.read_sys_light_select_font_color_day,
                R.color.read_sys_light_unselect_font_color_day,
                R.drawable.read_sys_light_bg_day);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.drawable.read_theme_bg_1,
                R.color.novel_edit_content_color_book_white,
                R.color.novel_edit_line_color_book_white,
                R.color.novel_edit_content_hint_color_book_white,
                R.drawable.seekbar_style_read,
                R.drawable.read_process,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }




    /**
     * 浅红色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeRed(int type) {
        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.color.read_content_bg_color_red,
                R.drawable.novel_back_img_red,
                R.drawable.novel_retreat2_img_red,
                R.drawable.novel_retreat_img_red,
                R.drawable.novel_advance2_img_red,
                R.drawable.novel_advance_img_red,
                R.drawable.novel_timi_img_red,
                R.drawable.novel_save_img_red,
                R.color.read_desc_font_color_red,
                R.color.read_sys_light_select_font_color_red,
                R.drawable.novel_create_line_red,
                R.drawable.one_pattern_img_red,
                R.drawable.novel_sensitive_img_red);
        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_red,
                R.drawable.novel_setup_img_red,
                R.drawable.novel_history_img_red,
                R.color.read_desc_font_color_red,
                R.color.read_content_bg_color_red,
                1.0f,
                R.drawable.img_dialog_red);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_red,
                R.drawable.read_brightness_reduce_red,
                R.drawable.read_brightness_increase_red,
                R.drawable.read_font_size_add_red,
                R.drawable.read_font_size_sub_red,
                themeSelectArray,
                R.drawable.read_selected_red,
                1.0f,
                R.color.read_sys_light_select_font_color_red,
                R.color.read_sys_light_unselect_font_color_red,
                R.drawable.read_sys_light_bg_red);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.color.read_content_bg_color_red,
                R.color.novel_edit_content_color_red,
                R.color.novel_edit_line_color_red,
                R.color.novel_edit_content_hint_color_red,
                R.drawable.seekbar_style_read_red,
                R.drawable.read_process_red,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }

    /**
     * 仿真红色主题
     * @param type
     * @return
     */
    public static EditNovelTheme getThemeBookRed(int type) {
        EditNovelTheme.TopBarTheme topMenuTheme = new EditNovelTheme.TopBarTheme(
                R.drawable.read_theme_bg_2_bar,
                R.drawable.novel_back_img_realred,
                R.drawable.novel_retreat2_img_realred,
                R.drawable.novel_retreat_img_realred,
                R.drawable.novel_advance2_img_realred,
                R.drawable.novel_advance_img_realred,
                R.drawable.novel_timi_img_realred,
                R.drawable.novel_save_img_realred,
                R.color.read_status_bar_font_color_red,
                R.color.read_sys_light_select_font_color_red,
                R.drawable.novel_create_line_red,
                R.drawable.one_pattern_img_realred,
                R.drawable.novel_sensitive_img_realred);
        EditNovelTheme.BottomBarTheme bottomMenuTheme = new EditNovelTheme.BottomBarTheme(
                R.drawable.read_night_st_realred,
                R.drawable.novel_setup_img_realred,
                R.drawable.novel_history_img_realred,
                R.color.read_status_bar_font_color_red,
                R.drawable.read_theme_bg_2_bar,
                1.0f,
                R.drawable.img_dialog_red);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        EditNovelTheme.MenuTheme menuTheme = new EditNovelTheme.MenuTheme(
                R.color.read_menu_bg_color_red,
                R.drawable.read_brightness_reduce_red,
                R.drawable.read_brightness_increase_red,
                R.drawable.read_font_size_add_red,
                R.drawable.read_font_size_sub_red,
                themeSelectArray,
                R.drawable.read_selected_red,
                1.0f,
                R.color.read_sys_light_select_font_color_red,
                R.color.read_sys_light_unselect_font_color_red,
                R.drawable.read_sys_light_bg_red);

        EditNovelTheme.PunctuationTheme punctuationTheme = new EditNovelTheme.PunctuationTheme(
                R.color.all_activity_bg,
                R.color.divider_line_color_3,
                R.drawable.creating_novels_retractkeyboard
        );
        return new EditNovelTheme(
                type,
                R.drawable.read_theme_bg_2,
                R.color.novel_edit_content_color_book_red,
                R.color.novel_edit_line_color_book_red,
                R.color.novel_edit_content_hint_color_book_red,
                R.drawable.seekbar_style_read_red,
                R.drawable.read_process_red,
                topMenuTheme,
                bottomMenuTheme,
                menuTheme,
                punctuationTheme);

    }

}
